@import 'mixins/header';
@import 'mixins/footer';

@include b(modal) {
  @include component-header;
  @include component-footer;

  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  overflow: hidden;
  outline: none;

  @include m(center) {
    display: flex;

    @include e(content) {
      max-height: calc(100% - 40px);
      margin: auto;
    }
  }

  @include m(type) {
    @include e(body) {
      display: flex;
    }

    @include e(footer) {
      padding: 0 16px 12px;
      border: none;
    }
  }

  @include e(content) {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    max-width: calc(100% - 32px);
    margin: 0 auto;
    background-color: var(--#{$rd-prefix}background-color);
    border-radius: var(--#{$rd-prefix}border-radius);
    box-shadow: 0 8px 40px 0 var(--#{$rd-prefix}shadow-color);
  }

  @include e(header) {
    flex-shrink: 0;
  }

  @include e(body) {
    position: relative;
    padding: 20px;
    overflow: hidden auto;
  }

  @include e(footer) {
    flex-shrink: 0;
  }

  @include e(icon) {
    flex-shrink: 0;
    margin-right: 16px;
    font-size: 1.75em;
  }

  @include e(title) {
    margin-bottom: 12px;
    font-size: 1.1em;
    font-weight: $rd-font-weight-bold;
  }

  @include e(description) {
    color: var(--#{$rd-prefix}text-color-sub);
  }

  @include e(type-wrapper) {
    flex-grow: 1;
  }
}
